package org.shj.pattern.state;

public class StateA extends State{
	

	@Override
	public void handle(Context ctx) {
		if("A".equalsIgnoreCase(ctx.getCurStatus())){
			//do something when Status is A.
			System.out.println("Current Status is A.");
		}else{
			ctx.setStatus(new StateB()); //StatusB is the next status of StatusA
			ctx.request();
		}
	}

	
}
